package com.zhdl.modules.demo.web.request;

import lombok.Data;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.Max;
import javax.validation.constraints.Min;
import java.io.Serializable;

/**
 * @Author: zhangyy
 * @Email: zhang10092009@hotmail.com
 * @Date: 2023/3/31 17:27:17
 * @Version: v1.0
 * @Modified:
 * @Description:
 */
@Data
public class DemoTest implements Serializable {
    /**
     * 名称
     */
    @Length(min = 2, max = 32, message = "长度范围2-32")
    private String name;

    /**
     * 年龄
     */
    @Min(value = 1, message = "年龄最小 1")
    @Max(value = 130, message = "年龄最大 130")
    private int age;
}
